/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ticketmaster.businesslogic;

import java.util.Collection;
import ticketmaster.dao.BookedTicketDAO;
import ticketmaster.dao.DAOFactory;
import ticketmaster.dataobject.BookedTicket;

/**
 *
 * @author Wei Liu
 */
public class BookedTicketController
{
    public Collection<BookedTicket> saveBookedTickets(Collection<BookedTicket> bookedTickets)
    {
        BookedTicketDAO bookedTicketDAO = DAOFactory.getInstance().getBookedTicketDAO();
        for(BookedTicket ticket : bookedTickets)
        {
            ticket.setBookedTicketID(bookedTicketDAO.insertBookedTicket(ticket));
        }
        return bookedTickets;
    }
}
